package cn.ztydata.teachingsystem.heaven.entity.test;

import cn.ztydata.teachingsystem.heaven.entity.BaseEntity;
import cn.ztydata.teachingsystem.heaven.entity.exercise.ExerciseBlank;

import java.util.List;

/**
 * 习题学生答案实体类
 * Created by cx on 2015/3/26.
 */
public class StudentAnswer extends BaseEntity {
    private Long studentId; //学生ID
    private Long testId; //测试ID
    private Long exerciseId; //习题ID
    private Integer status; //回答状态 0：错误，1：正确，2：未答，3：主观题未评判，4：主观题已评判
    private Integer score; //习题得分
    private String answerContent; //回答内容记录
    private String teacherComment; //教师评语

    private List<Long> options; //所选项ID
    private List<ExerciseBlank> exerciseBlanks; //所填空信息

    private List<StudentAnswer> sonStudentAnswers; //子习题学生答案

    private Long parentId; //父习题ID，初始化为0

    private int defineScore;//习题初始分值

    public StudentAnswer(){
    }

    public StudentAnswer(Long studentId, Long testId, Long exerciseId) {
        this.studentId = studentId;
        this.testId = testId;
        this.exerciseId = exerciseId;
    }

    public Long getExerciseId() {
        return exerciseId;
    }

    public void setExerciseId(Long exerciseId) {
        this.exerciseId = exerciseId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public String getAnswerContent() {
        return answerContent;
    }

    public void setAnswerContent(String answerContent) {
        this.answerContent = answerContent;
    }

    public String getTeacherComment() {
        return teacherComment;
    }

    public void setTeacherComment(String teacherComment) {
        this.teacherComment = teacherComment;
    }

    public List<Long> getOptions() {
        return options;
    }

    public void setOptions(List<Long> options) {
        this.options = options;
    }

    public List<ExerciseBlank> getExerciseBlanks() {
        return exerciseBlanks;
    }

    public void setExerciseBlanks(List<ExerciseBlank> exerciseBlanks) {
        this.exerciseBlanks = exerciseBlanks;
    }

    public List<StudentAnswer> getSonStudentAnswers() {
        return sonStudentAnswers;
    }

    public void setSonStudentAnswers(List<StudentAnswer> sonStudentAnswers) {
        this.sonStudentAnswers = sonStudentAnswers;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public Long getTestId() {
        return testId;
    }

    public void setTestId(Long testId) {
        this.testId = testId;
    }

    public void setCorrectResult(final int staus, final int score) {
        setStatus(staus);
        setScore(score);
    }

    public int getDefineScore() {
        return defineScore;
    }

    public void setDefineScore(int defineScore) {
        this.defineScore = defineScore;
    }
}
